package top.jle.wx.proxy.facade;

import top.jle.jpa.basic.dao.PagedResult;
import top.jle.wx.proxy.constant.MaterialOption;
import top.jle.wx.proxy.domain.material.Article;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface MaterialFacade {
    MaterialOption.TemporaryMaterialResponse addTemporary(String type, MultipartFile file);

    ResponseEntity<byte[]> getTemporary( String mediaId) throws IOException;

    MaterialOption.MaterialResponse addMaterial( String type, MultipartFile file, MaterialOption.VideoDescription videoDescription);

    ResponseEntity<byte[]> getMaterial(String mediaId);

    MaterialOption.MaterialResponse addNews(List<Article> articles);

    void updateArticle( String mediaId, Integer index, Article article);

    void deleteMaterial(String mediaId);

    MaterialOption.MaterialCountResponse getMaterialCount();

    PagedResult<MaterialOption.MaterialItemResponse> batchGetMaterial(String type, int page, int limit);

    PagedResult<MaterialOption.MaterialArticleItemResponse> batchGetArticleMaterial(int page, int limit);

    MaterialOption.MaterialResponse uploadImgForArticle( MultipartFile file);
}
